Allow xm to spawn vnc viewer
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 30 Jul 2008 15:22:45 +0000 (16:22 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 30 Jul 2008 15:22:45 +0000 (16:22 +0100)
commitcd1f9abc4a88725a7a889c80ecaa2a64804816c4
tree6251523879cd1404fe514ae7f0bd4bf002681b07
parentfb044093f641aac7f7594e866e07733df64898e6
Allow xm to spawn vnc viewer

The new merged qemu no longer has the ability to spawn a vnc viewer
process in the bowels of the xend/qemu stack.  In this patch we
provide support for this use case in a different manner - one more
akin to the mechanism used for `xm console' and `xm create -c'.

We introduce new xm options:
   xm create --vncviewer [--vncviewer-autopass]
   xm vncviewer [--vncviewer-autopass]

These spawn a VNC viewer, obtaining the relevant information
(including the port number and if you tell it your viewer supports it
the password to use) directly from xenstore.

Like xm console it waits in the foreground for the vnc port to become
available; the timeout case isn't handled as well as it might be - it
just causes the whole program (xm) to die with `Alarm clock' but this
is difficult to deal with given the current structure of the xs Python
lowlevel interface, which doesn't provide a timeout on the call to
wait for a xenstore watch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/python/xen/util/utils.py
tools/python/xen/xm/console.py
tools/python/xen/xm/create.py
tools/python/xen/xm/main.py